/**
 * <p>Copyright (c) 2017 深圳市鹏途交通科技有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 * 
 * <p>项目名称 ： 	深圳市国省检日常化监管系统         </p>
 * <p>创建者   :	heyong 
 * 
 * <p>描   述  :   SiteCheck.java for com.pengtu.gsj.entity.zhgl    </p>
 * 
 * <p>最后修改 : $: 2017年8月14日-上午10:51:16 v 1.0.0	 heyong   $ </p>
 * 
*/

package com.pengtu.gsj.entity.zhgl;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;

/**
 * 
 * SiteCheck
 * 综合评价路容路貌现场检查实体类
 * 2017年8月14日 上午10:51:16
 * 
 * @version 1.0.0
 * 
 */
@Entity
@Table(name = "T_ZH_SITECHECK")
public class SiteCheck extends IdEntity {

	private static final long serialVersionUID = -6545508505658790937L;
	private String roadName;						//道路名称
	private String roadNo;							//道路编号
	private String testYear;						//检查时间
	private String roadCondition;					//路面状况
	private String roadFacility;					//公路设施状况
	private String roadBed;							//路基，边坡状况
	private String roadAfforest;					//绿化及管护状况
	private String remark;
	
	
	private Integer bulletinNumber;     //检测文件数
	private List<Attachment> attachments;
	
	
	@Column(name = "ROADNAME")
	public String getRoadName() {
		return roadName;
	}
	public void setRoadName(String roadName) {
		this.roadName = roadName;
	}
	@Column(name = "ROADNO")
	public String getRoadNo() {
		return roadNo;
	}
	public void setRoadNo(String roadNo) {
		this.roadNo = roadNo;
	}
	@Column(name = "TESTYEAR")
	public String getTestYear() {
		return testYear;
	}
	public void setTestYear(String testYear) {
		this.testYear = testYear;
	}
	@Column(name = "ROADCONDITION")
	public String getRoadCondition() {
		return roadCondition;
	}
	public void setRoadCondition(String roadCondition) {
		this.roadCondition = roadCondition;
	}
	@Column(name = "ROADFACILITY")
	public String getRoadFacility() {
		return roadFacility;
	}
	public void setRoadFacility(String roadFacility) {
		this.roadFacility = roadFacility;
	}
	@Column(name = "ROADBED")
	public String getRoadBed() {
		return roadBed;
	}
	public void setRoadBed(String roadBed) {
		this.roadBed = roadBed;
	}
	@Column(name = "ROADAFFOREST")
	public String getRoadAfforest() {
		return roadAfforest;
	}
	public void setRoadAfforest(String roadAfforest) {
		this.roadAfforest = roadAfforest;
	}
	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}							
	
	
	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
	
}
